<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html lang="en">
<HEAD>

<meta name="copyright" content="Copyright (c) IBM Corporation and others 2000, 2005. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE>
Marker help and resolution
</TITLE>

<link rel="stylesheet" type="text/css" HREF="../book.css">
</HEAD>
<BODY BGCOLOR="#ffffff">
<h3>Marker help and resolution</h3>
<p>In <a href="resAdv_markers.htm">Resource markers</a>, we saw how plug-ins can
define specialized marker types in order to annotate resources with
information.&nbsp; The <a href="../samples/org.eclipse.ui.examples.readmetool/doc-html/ui_readmetool_ex.html">readme
tool</a> example defines its own markers in order to demonstrate two
marker-related workbench extensions:&nbsp; <b>marker help</b> and <b>marker
resolutions</b>.&nbsp; The marker definition is in the readme plug-in's manifest
markup:</p>


<pre>&lt;extension id=&quot;readmemarker&quot; point=&quot;org.eclipse.core.resources.markers&quot; name=&quot;%ReadmeMarker.name&quot;&gt;
	&lt;super type=&quot;org.eclipse.core.resources.taskmarker&quot;/&gt;
	&lt;super type=&quot;org.eclipse.core.resources.textmarker&quot;/&gt;
	&lt;persistent value=&quot;true&quot;/&gt;
	&lt;attribute name=&quot;org.eclipse.ui.examples.readmetool.id&quot;/&gt;
	&lt;attribute name=&quot;org.eclipse.ui.examples.readmetool.level&quot;/&gt;
	&lt;attribute name=&quot;org.eclipse.ui.examples.readmetool.department&quot;/&gt;
	&lt;attribute name=&quot;org.eclipse.ui.examples.readmetool.code&quot;/&gt;
	&lt;attribute name=&quot;org.eclipse.ui.examples.readmetool.language&quot;/&gt;
&lt;/extension&gt;   </pre>


<p>The tool defines a marker that inherits from the platform's text marker and
task marker.&nbsp; It also defines named attributes for the marker.&nbsp;&nbsp;
Marker attributes can be set and queried.</p>


<p>Since the new readme marker is a kind of text marker, it
inherits the text marker attributes.&nbsp; The text marker attributes include
the character location of the marker.</p>


<p>Markers can be added to a <b>.readme</b> file using the readme editor's popup
menu.&nbsp; (The popup menu actions are added dynamically in <b>ReadmeTextEditor.<font SIZE="2" COLOR="#000000">editorContextMenuAboutToShow(IMenuManager</font>
</b><font SIZE="2" COLOR="#000000"><b>parentMenu)</b>).&nbsp; Once added,
the markers appear on the left side of the editor and in the tasks view.</font></p>


<p><img src="images/readmemarkermenu.png" alt="Readme editor with readme markers on left side ruler" border="0"></p>





</BODY>
</HTML>
